Skip to content

Cosmopower update#234

Open
ggalloni wants to merge 11 commits intomasterfrom
cosmopower_update
Open

Cosmopower update#234
ggalloni wants to merge 11 commits intomasterfrom
cosmopower_update

Conversation

@ggalloni
Copy link
Collaborator

Hi @itrharrison @HTJense, here I tried to pull cosmopower from @HTJense's fork to check its compatibility with the rest of the code.

Also, to update to numpy 2, I had to pull pyccl from git as the PyPI version was built against numpy 1.x, while the git one works fine with 2.x.

This allowed to add support to Python 3.14 and to update many of our dependencies.

The new API of cosmopower caused a couple of issues, which should be solved now.
In general, I am not a big fan of pulling dependencies from git as it is far less stable than PyPI, but as you know, this has become a critical issue, so we might have to come to terms with that.

Copy link
Collaborator

@itrharrison itrharrison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, modulo the comment below about not being able to deploy to pypi.

]
pyccl = [
"pyccl>=3.1.2 ; sys_platform != 'win32' and python_version < '3.13'", # for stability
"pyccl @ git+https://github.com/LSSTDESC/CCL.git@master ; sys_platform != 'win32' and python_version < '3.13'",
Copy link
Collaborator

@itrharrison itrharrison Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be aware that we would no longer be able to deploy to pypi because of taking dependencies from git.

In person we discussed with @anicola that it is unlikely the pyccl pip package will continue to be maintained, but the conda one will.

I guess we could cheat the system a little by keeping these requirements out of our pyproject.toml but including them in the uv env(?). But of course then it would be very easy for a user to acquire a non-functioning installation via pip. If such a naive user exists(?)...

[tool.uv]
override-dependencies = [
"tensorflow>=2.18",
"tensorflow-probability>=0.24",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can @HTJense update these dependencies directly in https://github.com/HTJense/cosmopower/blob/main/requirements.txt too?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants